package com.recipedb.recipedb.service;

import com.recipedb.recipedb.entity.Likes;
import com.recipedb.recipedb.entity.LikesId;
import java.util.List;
import java.util.Optional;

public interface LikesService {
    Likes save(Likes entity);
    void deleteById(LikesId id);
    Optional<Likes> findById(LikesId id);
    List<Likes> findAll();
    List<Likes> findByUserId(Long userId);
    List<Likes> findByRecipeId(Long recipeId);
    boolean existsByUserIdAndRecipeId(Long userId, Long recipeId);
    List<Likes> findRecentLikesByUserId(Long userId, int limit);
    // 在 LikesService 接口中添加
    void deleteByUserIdAndRecipeId(Long userId, Long recipeId);
}
